<%@page import="com.lynn.salary.util.ToolMethod"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
	String aid=ToolMethod.getCharAndNumr(6);
%>
<form action="" onsubmit="return false;">

<script type='text/javascript' src='<%=basePath %>dwr/engine.js'></script>
<script type='text/javascript' src='<%=basePath %>dwr/interface/RemoteService.js'></script>
<script type='text/javascript' src='<%=basePath %>dwr/util.js'></script>
	<input name="flag" value="1" type="hidden" />
	<div style="padding-left: 25px;padding-top: 35px;">
		<div style="font-size: 12px;">
			登录启尚投资
		</div>
		<div style="padding-top: 6px;">
			<input id="name_<%=aid %>" name="user.id" type="text" style="width: 240px;font-size: 14px;"/>
		</div>
		<div style="padding-top: 6px;">
			<input id="pwd_<%=aid %>" name="user.password" type="password" style="width: 240px;font-size: 14px;"/>
		</div>
		<div style="padding-top: 6px;">
			<input id="sub_<%=aid %>" type="submit" value="登录"/>
			<a href="<%=basePath%>register.do" style="text-decoration: none;font-size:12px;color:blue;">注册</a>
		</div>
		<div id="hid_<%=aid %>" style="display:none;color:red;">
			
		</div>
	</div>
<script type='text/javascript'>
	$("#sub_<%=aid %>").click(function(e){
		var name = $("#name_<%=aid %>").attr("value");
		var pwd = $("#pwd_<%=aid %>").attr("value");
		if(name==null || pwd==null || $.trim(name) == ''){
			$("#hid_<%=aid %>").show();
			$("#hid_<%=aid %>").html('请填写完整信息...');
			return false;
		}
		
		$("#hid_<%=aid %>").show();
		$("#hid_<%=aid %>").html('正在登录...');
		RemoteService.frontEndLogin(name,pwd,function(data){
			if(data == 'success') {
				refresh_troggle();
				refresh_content();
			} else {
				$("#hid_<%=aid %>").html(data);
				//$("#hid_<%=aid %>").show();
			}
		});
	});
</script>
</form>


